
#include "../include/ehome.h"

#define LEDS_ON  0x100001
#define LEDS_OFF 0x100002

int leds_operation(int index,int cmd){
    int fd;
    char *str=NULL;
    
    fd=open("/dev/leds",O_RDONLY);
    if(fd<0){
        str=strerror(errno);
        pr_debug("open leds failed:%s\n",str);
        return -1;
    }
        if(cmd){
            ioctl(fd,LEDS_ON,&index);
        }else{
            ioctl(fd,LEDS_OFF,&index);
        }
    return 0;
}
